home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / CWPApplication.cp < prev    next >
Text File  |  1997-06-28  |  630b  |  46 lines

  1. // CWPApplication.cp
  2.  
  3. #ifndef CWPApplication_h
  4. #include "CWPApplication.h"
  5. #endif
  6. #ifndef Application_h
  7. #include "Application.h"
  8. #endif
  9. #ifndef WindowInitializer_h
  10. #include "WindowInitializer.h"
  11. #endif
  12.  
  13. CWPApplication::CWPApplication()
  14.   : CommandHandler<Creating>( Focus() )
  15.   {
  16.   }
  17.  
  18. CWPApplication& CWPApplication::The()
  19.   {
  20.     static CWPApplication the;
  21.     return the;
  22.   }
  23.  
  24. void main()
  25.   {
  26.     CWPApplication::The().Run();
  27.   }
  28.  
  29. bool CWPApplication::CanCreate() const
  30.   {
  31.     return true;
  32.   }
  33.  
  34. void CWPApplication::Create()
  35.   {
  36.     try
  37.       {
  38.         WindowInitializer initializer;
  39.         NewCWPWindow( initializer );
  40.       }
  41.      catch ( ... )
  42.       {
  43.       }
  44.   }
  45.  
  46.